<template>
  <div class="fillcontain">
    <head-top></head-top>
    <div class="table_container">
      <el-table :data="lotteryData.prizeInfo" style="width: 100%;">
        <el-table-column label="序号" prop="languageCode" width="150" align="center">
          <template scope="scope">
            {{scope.$index + 1}}
          </template>
        </el-table-column>
        <el-table-column label="奖品名称" prop="commodityName" align="center">
          <template scope="scope">
            <el-input size="small" v-model="scope.row.commodityName" :value="scope.commodityName" placeholder="请输入奖品名称"></el-input>
          </template>
        </el-table-column>
        <el-table-column label="奖品标识" prop="level" align="center">
          <template scope="scope">
            <el-input size="small" v-model="scope.row.level" placeholder="请输入奖品标识"></el-input>
          </template>
        </el-table-column>
        <el-table-column label="奖品图片地址" prop="picUrlDesc" align="center">
          <template scope="scope">
            <el-input size="small" v-model="scope.row.picUrlDesc" placeholder="请输入奖品图片地址"></el-input>
          </template>
        </el-table-column>
      </el-table>
      <el-row class="P_button">
        <el-button type="primary" @click="onSubmit">保存</el-button>
        <el-button @click="onDelete">重置</el-button>
      </el-row>
    </div>
  </div>
</template>

<script>
import showBigImg from '../components/showBigImg.vue'
import headTop from '../components/headTop'
export default {
  name: 'pointsdraw',
  data () {
    return {
      lotteryData: {
        "title": "大轮盘抽奖", // 抽奖名称
        "imgSrc": "../../src/assets/images/lotteryComponents/lottery.png", // 大轮盘抽奖图片
        "prizeInfo": [  // 对应奖品列表
          {
            "level": 1, // 奖品排列序号
            "type": "missed", // 奖品类型 [missed未中奖 , virtual话费或者流量,  physical实物]
            "picUrlDesc": "../../src/assets/images/lotteryComponents/2m.png", // 奖品小图
            "prizeId": "55213123123", // 奖品ID 可以不给
            "commodityName": "3元话费" // 奖品名称
          }, {
            "level": 2,
            "type": "virtual",
            "picUrlDesc": "../../src/assets/images/lotteryComponents/iphone.png",
            "prizeId": "55213123123",
            "commodityName": "2元话费"
          }, {
            "level": 3,
            "type": "virtual",
            "picUrlDesc": "../../src/assets/images/lotteryComponents/2m.png",
            "prizeId": "55213123123",
            "commodityName": "50元话费"
          }, {
            "level": 4,
            "type": "virtual",
            "picUrlDesc": "../../src/assets/images/lotteryComponents/mini.png",
            "prizeId": "55213123123",
            "commodityName": "100M流量"
          }, {
            "level": 5,
            "type": "virtual",
            "picUrlDesc": "../../src/assets/images/lotteryComponents/5m.png",
            "prizeId": "55213123123",
            "commodityName": "爱奇艺会员"
          }, {
            "level": 6,
            "type": "physical",
            "picUrlDesc": "../../src/assets/images/lotteryComponents/3m.png",
            "prizeId": "55213123123",
            "commodityName": "100元加油卡"
          }, {
            "level": 7,
            "type": "virtual",
            "picUrlDesc": "../../src/assets/images/lotteryComponents/hw.png",
            "prizeId": "55213123123",
            "commodityName": "20M流量"
          }, {
            "level": 8,
            "type": "physical",
            "picUrlDesc": "../../src/assets/images/lotteryComponents/10m.png",
            "prizeId": "55213123123",
            "commodityName": "ipad 32G"
          }
        ]
      }, // 接口数据
    }
  },
  components: {
    showBigImg,
    headTop
  },
  methods: {
    onSubmit () { },
    onDelete () { }
  },
  mounted () { }
}
</script>

<style lang="less" scoped>
.table_container {
  padding: 20px;
  .P_button {
    width: 100%;
    text-align: center;
    margin-top: 30px;
  }
}
</style>


